<template>
	<div>
		<ynet-button @click="callMessageCode">唤起短信验码</ynet-button>
		<ynet-message-code 
			v-model="openMessageCode"
			phone="13710260747"
		></ynet-message-code>
	</div>
</template>
<script>
	import { MessageCode, Button } from 'ynet-mobile'
	export default {
		title: '短信验证码',
		name: 'message-code-demo',
		components: {
			[MessageCode.name]: MessageCode,
			[Button.name]: Button
		},
		data(){
			return {
				openMessageCode: false,
				code: '',
				start: false,
				time: 60
			}
		},
		methods: {
			callMessageCode(){
				this.openMessageCode = true
			}
		}
	}
</script>